1. Field of the Invention
The present invention relates to sending email messages between servers, and particularly to a fast path message transfer agent for these email messages.
2. Description of the Related Art
FIG. 1 illustrates a simplified email system 100 that can send or receive messages over the Internet 103. System 100 typically uses Simple Mail Transfer Protocol (SMTP) to send messages between servers 101 and 102. Clients 104-106 can use server 101 to route their email, whereas clients 107-109 can use server 102 to route their email.
Servers 101 and 102 temporarily store and re-route the email messages from clients 104-109 to the appropriate destinations. Specifically, Message Transfer Agents (MTAs) 110 and 111, installed in servers 101 and 102, respectively, can route messages according to addresses designated in the email. MTAs can use retry logic and queues (explained in further detail below) to efficiently direct the messages.
FIGS. 2A and 2B illustrate a flow chart of a standard embodiment of an MTA operation. In step 201, the MTA, in a first email server, receives a network connection from a second email server. The MTA can then receive bytes of a message over this connection in step 202. In step 203, the MTA writes those bytes into a dynamic (e.g. DRAM or SRAM) memory to quickly capture those bytes and then stores those bytes into a non-volatile storage device until delivery to their final destination(s) (i.e. the clients associated with the first email server).
If all bytes of the message have not been received, as determined in step 204, then the process returns to step 202 to receive additional bytes of the message over the connection. If all bytes of the message have been received, then the MTA responds to the server that the message has been successfully received in step 205. Note that if a system failure (e.g. a full condition or power outage) occurs during steps 201-203, then the MTA can respond to the server with an error message, wherein the server can re-establish network connection at a later point in time to resend the message. In this case, the MTA can delete any bytes of the message that were written to the memory or stored in the non-volatile storage device.
Assuming successful receipt, the stored bytes for a message in the non-volatile storage device are now in a queue of messages to be re-routed to their destinations. When a message is next in queue, the MTA retrieves the message from the non-volatile storage in step 206. The MTA attempts to send the message to each destination designated by the message in step 207. If the message was not successfully delivered to all destinations, as determined by step 208, then the MTA can identify the failed destinations in step 210 and then retry delivering the message to the failed destinations after some delay in step 211. In one embodiment, the message and its failed destinations can be returned to a queue in the non-volatile storage device, wherein the process returns to step 206. If the message was successfully delivered to all destinations, then the message is removed from the non-volatile storage device in step 209 and the delivery process for that message ends.
Continuously storing and accessing messages on the non-volatile storage device undesirably increases the time of email delivery. Therefore, a need arises for a method of decreasing email delivery time.